<template>
  <div>
    <van-swipe :autoplay="2000" lazy-render>
      <van-swipe-item v-for="image in images" :key="image.id">
        <img :src="image.image" />
      </van-swipe-item>
    </van-swipe>
  </div>
</template>

<script setup lang="ts">
import { ref } from "vue";
import { getSwiper } from "../../server/produce";
let images = ref([
  {
    id: 1,
    image:
      "https://img1.baidu.com/it/u=1376167601,177509697&fm=253&fmt=auto&app=138&f=JPEG?w=1000&h=373",
  },
  {
    id: 1,
    image:
      "https://img.zcool.cn/community/0135ef5c4593a9a801213f26162219.jpg?x-oss-process=image/auto-orient,1/resize,m_lfit,w_1280,limit_1/sharpen,100",
  },
  {
    id: 1,
    image:
      "https://img.zcool.cn/community/01f6f5577b86e60000018c1b70e1b0.jpg@1280w_1l_2o_100sh.jpg",
  },
]);
// 获取轮播图数据
// getSwiper().then((res: any) => {
//   console.log(res);

//   if (res.code === "200") {
//   }
// });
</script>

<style lang="scss" scoped>
div {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  img {
    display: block;
    width: 100%;
    height: 100%;
  }
}
</style>
